package org.example.search.service;

import com.google.gson.JsonObject;
import io.milvus.v2.service.vector.response.InsertResp;
import io.milvus.v2.service.vector.response.SearchResp;
import io.milvus.v2.service.vector.response.UpsertResp;
import org.example.search.entity.SearchDto;

public interface MilvusService {
    /**
     * 初始化集合
     */
    Object init();

    /**
     * 插入数据
     */
    InsertResp insert(SearchDto searchDto) throws Exception;

    /**
     * 更新或插入数据
     */
    UpsertResp upsert(SearchDto searchDto) throws Exception;

    /**
     * 向量搜索
     */
    Object searchVec(String title) throws Exception;

    /**
     * 创建索引
     */
    Object createIndex();

    /**
     * 删除索引
     */
    Object dropIndex();
} 